[% setvar title The Perl 6 Summary for the week ending 20030105 %]
<div id="archive-notice">
    <h3>This file is part of the Perl 6 Archive</h3>
    <p>To see what is currently happening visit <a href="http://www.perl6.org/">http://www.perl6.org/</a></p>
</div>
<div class='pod'>
<a name='The Perl 6 Summary for the week ending 20030105'></a><h1>The Perl 6 Summary for the week ending 20030105</h1>
<p>Hello and welcome to the first summary of 2003, welcome to the
future. This summary covers 2 weeks, but they've been quietish what
with Christmas and the New Year.</p>
<p>So, starting as usual with perl6-internals</p>
<a name='A pile of patches to the Perl 6 compiler'></a><h2>A pile of patches to the Perl 6 compiler</h2>
<p>Joseph F. Ryan submitted a bunch of patches to the Perl 6 mini
compiler, (found in the <b><i>languages/perl6</i></b> subdirectory of your
friendly neighbourhood parrot distribution) mostly implementing the
the semantics for string and numeric literals discussed on
perl6-documentation.</p>
<a name='Garbage Collection headaches'></a><h2>Garbage Collection headaches</h2>
<p>Heads have been put together in an attempt to get Parrot's Garbage
Collection system working efficiently and accurately (no destroying
stuff before anyone's had a chance to use it, dammit!) It appears
that there's still a good deal of head scratching to be done in this
area (the chaps over on the LL1 list are wondering why we aren't just
using the Boehm GC system...)</p>
<p>I freely admit that GC makes my head hurt (especially as, in my
current Perl 5 project I'm busy implementing mark and sweep
collection for a persistent object store whilst also making sure that
my random assortment of circular data structures has weakened
references in just the right places so that stuff gets destroyed but
only when it *should* be destroyed... Boy, am I looking forward to
Perl 6 and not having to worry about this stuff ever again...) but I
I'll have a go at summarizing the issues.</p>
<p>The main problem appears to be that of 'Infant mortality', an issue
that I will now attempt to explain.</p>
<p>All the objects in memory can be represented as nodes in a graph, and
the pointers between those objects can be represented as edges in
that graph. The process of garbage collection involves taking a
subset of those nodes (the rootset) and freeing (or marking as
freeable) all those nodes in the graph which are not reachable from
the rootset.</p>
<p>Now, consider a function that sets up a new PMC, specifically a PMC
that contains another PMC. The first step is grab the memory for our
new PMC. Next we create the contained PMC, a process which allocates
more memory... and there's the rub. Garbage Collection can get
triggered at any point where we go to allocate more memory; unless
the <i>containing</i> PMC is reachable from the rootset then it will get
freed at the point. And that leads to badness. So the Infant
Mortality problem can also be thought of as the problem of rootset
maintenance. Which is, in theory, simple; just treat all C variables
as members of the rootset. However, in practice it isn't that simple,
mostly because hardware registers complicate the issue.</p>
<p>Steve Fink offered an overview of the issues and some of the possible
approaches to dealing with them, which sparked a fair amount of
discussion amongst those who understood the issues.</p>
<p><a href='http://groups.google.com/groups?threadm=a05200f07ba2d0834cfdf@' target='_blank'>groups.google.com</a>[63.120.19.221]</p>
<p><a href='http://groups.google.com/groups?threadm=20021231000055.GA23896@foxglove.digital-integrity.com' target='_blank'>groups.google.com</a> -- Steve's
overview</p>
<a name='Variable/value vtable split'></a><h2>Variable/value vtable split</h2>
<p>Leo T&ouml;tsch posted a summary of where we stand on doing the
variable/value vtable split, suggesting that he wanted to start
feeding in patches soon. Mitchell N Charity supplied a handy dandy
'context' post with links to appropriate articles, and he and Leo did
a certain amount of thrashing out of issues.</p>
<p><a href='http://groups.google.com/groups?threadm=3E1067FF.5030307@toetsch.at' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=200212310239.gBV2dC524913@vendian.org' target='_blank'>groups.google.com</a></p>
<a name='Parrot gets another new language'></a><h2>Parrot gets another new language</h2>
<p>Ook! Jerome Quelin offered an implementation of the latest silly
language, Ook! which can be thought of as brainf.ck for
Librarians. Due to insanity, the Ook! compiler is implemented in
Parrot assembly, and emits parrot assembly too, which led Jerome to
ask for an 'eval' opcode. Which Leo promised to supply. And which Dan
specced out in PDD6. All of which led Leo to comment that, for all
these languages are toys, they do seem to be driving the
implementation of important bits of Parrot. Nicholas Clark reminded
everyone that a zcode interpreter would be another good thing to have
a crack at because it would require a couple of other really useful
bits of Parrot functionality. Ook! is now in the core.</p>
<p><a href='http://groups.google.com/groups?threadm=rt-19610-46602.16.0961486583524@bugs6.perl.org' target='_blank'>groups.google.com</a></p>
<a name='Returning new PMCs'></a><h2>Returning new PMCs</h2>
<p>David Robins wondered what was the resolution about creating and
returning a new PMC in PMC ops that take a <code>PMC* dest</code> parameter. He
and Dan discussed it back and forth and it became apparent that Dan
really needs to get Parrot Objects defined...</p>
<p><a href='http://groups.google.com/groups?threadm=Pine.LNX.4.44.0212311324290.2659-100000@davidrobins.net' target='_blank'>groups.google.com</a></p>
<a name='Fun with PerlHash'></a><h2>Fun with PerlHash</h2>
<p>Jerome Quelin noticed that you couldn't delete an item from a
PerlHash. Leo fixed it. Jerome later asked how one could retrieve the
keys of a PerlHash in Parrot assembly and wondered if there was a way
to traverse a hash. Sadly the answer is 'not yet', but happily Aldo
Calpini has something very nearly ready for prime time.</p>
<p><a href='http://groups.google.com/groups?threadm=200301021757.35942.jquelin@mongueurs.net' target='_blank'>groups.google.com</a></p>
<a name='GC/DOD feedback &amp; runtime tuning'></a><h2>GC/DOD feedback &amp; runtime tuning</h2>
<p>Dan has been playing some test programs and has found some major
issues with resource allocation and added his stress test programs to
the distribution so others could see if they could see how to fix
things. Leo T&ouml;tsch (who else) made some inroads, reporting his
progress to the list as he and Dan discussed ways forward.</p>
<p><a href='http://groups.google.com/groups?threadm=a05200f17ba3a6adff185@' target='_blank'>groups.google.com</a>[192.168.3.1]</p>
<a name='Object Semantics'></a><h2>Object Semantics</h2>
<p>Dan posted a sketch of how Parrot was going to deal with language
level objects. And there was much rejoicing. Various people pointed
out that Dan's assumption that 'real' languages only had reference
type objects was incorrect; ruby has value types, so does smalltalk
and C# and they're just the ones off the top of people's heads.</p>
<p><a href='http://groups.google.com/groups?threadm=a05200f16ba3a5968d9a6@' target='_blank'>groups.google.com</a>[192.168.3.1]</p>
<a name='Meanwhile in perl6-language'></a><h1>Meanwhile in perl6-language</h1>
<p>Not much was happening. The language folks seem to have taken their
holidays seriously; the last fortnight saw all of 76 posts.</p>
<a name='Tree frobbing facilities in Perl 6'></a><h2>Tree frobbing facilities in Perl 6</h2>
<p>Rich Morin wondered what kind of facilities Perl 6 would have for
monkeying about in trees, offering a discussion of the sort of thing
he wanted to do and the problems he saw with doing that in Perl
5. Michael Schwern reckoned that &quot;Doctor, it hurts when I do this.&quot;
applied (&quot;Well, don't do that then&quot;) and suggested other ways to
handle Rich's problem. Simon Cozens, who should know better made a
<i>terrible</i> joke about frobbing trees. Dave Whipp pointed out that
continuations should make it easy to treat tree traversal just like
traversing any other list.</p>
<p><a href='http://groups.google.com/groups?threadm=p05200f0dba2db8832a47@' target='_blank'>groups.google.com</a>[192.168.254.205]</p>
<a name='PRE/POST in loops'></a><h2>PRE/POST in loops</h2>
<p>Arthur Bergman is this week's hero. He's busily writing
<b>Hook::Scope</b> which will (eventually) implement Perl 6's
<code>PRE/POST/FINALLY/CATCH</code> etc. In Perl 5. Yay Arthur.</p>
<p>Anyway, Arthur wanted to know what happens with POST and PRE in loop
scopes. Do they get called for every iteration, or merely at the
beginning and end of the loop?</p>
<p>Luke Palmer reckons that POST gets executed for every iteration (NEXT
doesn't get executed on the last time through a loop.</p>
<p><a href='http://groups.google.com/groups?threadm=F41A933B-1E7E-11D7-BEB2-003065D64CBE@cpan.org' target='_blank'>groups.google.com</a></p>
<a name='my int ( 1..31 ) $var ?'></a><h1><code>my int ( 1..31 ) $var</code> ?</h1>
<p>Murat &Uuml;nalan didn't like Damian's proposed <code>my $date is
Integer(1..31);</code> (restricts $date to an integer between 1 and 31)
and proposed using <code>my int(1..31) $date</code> instead. He didn't like</p>
<pre>    my int ($pre, $in, $post) is constant = (0..2); </pre>
<p>either, proposing either of:</p>
<pre>    my constant int ($pre, $in, $post) = (0..2);
    my int is constant ($pre, $in, $post) = (0..2);</pre>
<p>Murat argued that 'type and property' belong together. Damian
disagreed, and pointed out that, if you <i>want</i> the specifiers close
together you could write:</p>
<pre>    my ($pre, $in, $post) returns int is constant = (0..2);</pre>
<p>I'm caricaturing (but only slightly) the rest of the discussion if I
say that the rest of the thread ran along the lines of a pantomime
argument (&quot;Oh yes it is!&quot; ... &quot;Oh no it isn't!&quot;), suffice to say I
don't think either Damian or Murat convinced the other. Personally I'm
on Damian's side -- sorry Murat.</p>
<p><a href='http://groups.google.com/groups?threadm=000001c2b32b$c4cb0400$6a00fea9@Platin' target='_blank'>groups.google.com</a></p>
<p><a href='http://groups.google.com/groups?threadm=000001c2b382$f4bfb500$6a00fea9@Platin' target='_blank'>groups.google.com</a></p>
<a name='Variable Types vs Value Types'></a><h2>Variable Types vs Value Types</h2>
<p>Dave Whipp wondered if the type of a variable could vary independently
of its value. I'm not sure I understand what Dave was driving at,
which makes summarizing his post a little tricky (but I <i>think</i>
there's confusion about the meaning of 'type'; A variable has what I
will call a 'sigil type' and may also have a more specific 'declared
type'. Thus, a declaration of the form <code>my Array $foo;</code>
declares a scalar (sigil type) variable which points to (contains) an
Array (declared type) object while one of the form <code>my Array @foo;</code> declares an array (sigil type) variable which contains a number of
Array (declared type) objects. The meaning of <code>my Array %foo</code>.</p>
<p>This led into a discussion of the 'Everything is an object'
principle, but more on that next week.</p>
<p><a href='http://groups.google.com/groups?threadm=20030103004227.16970.qmail@onion.perl.org' target='_blank'>groups.google.com</a></p>
<a name='In Brief'></a><h1>In Brief</h1>
<p>Leo T&ouml;tsch kept up his staggering patch generation rate. Does
he ever sleep?</p>
<p>Mitchell Charity supplied a script which generates a browseable list
of Parrot file names with brief descriptions, which should prove
useful to new developers who want to get a feel for the layout of
Parrot. Dan agreed, and it's in the Parrot distribution now as
<b><i>tools/dev/extract_file_descriptions.pl</i></b>.</p>
<p>Jason Gloudon got Garbage collection working on IA-64 Linux, yay
Jason.</p>
<p>Bruce Gray sent in a bunch of cleanup and win32 patches.</p>
<p>On a suggestion from Mitchell N Charity, Robert Spier has started
work on getting a browseable, cross-referenced version of the Parrot
source up on perl.org and asked to be pinged in a week or two if it
hasn't happened.</p>
<p>Jerome also improved the debugger.</p>
<p>Leon 'bear of very little brain' Brocard added a couple of wishlist
items: Objects, and a 'make install' that does something sensible.</p>
<a name='Who's Who in Perl 6?'></a><h1>Who's Who in Perl 6?</h1>
<ul>
<li><a name='Who are you?'></a>Who are you?</li>
<p>A twenty-something coder, writer, and editor who thinks it's possible to
improve the state of software and software development.</p>
<li><a name='What do you do for/with Perl 6?'></a>What do you do for/with Perl 6?</li>
<p>Random stuff:</p>
<ul>
<li><a name='argue language features with Allison, who lives very nearby'></a>argue language features with Allison, who lives very nearby</li>
<li><a name='proofread documentation when I'm trying to read it'></a>proofread documentation when I'm trying to read it</li>
<li><a name='extending Parrot as an embedded platform for game scripting'></a>extending Parrot as an embedded platform for game scripting</li>
<li><a name='overseeing the project to turn p6d documentation into executable test cases'></a>overseeing the project to turn p6d documentation into executable test
cases</li>
</ul>
<p>Maybe I need a Perl 6 Test Pumpking hat...</p>
<li><a name='Where are you coming from?'></a>Where are you coming from?</li>
<p>Physically, Portland, Oregon or Sebastopol, California.</p>
<p>Otherwise, I find that Perl 5 fits the way I think and expect Perl 6
to do the same, only much more so.</p>
<li><a name='When do you think Perl 6 will be released?'></a>When do you think Perl 6 will be released?</li>
<p>In beta form within the next two years.  Within five years, I think it
will overtake Perl 5. (I expect a 5.12, though.)</p>
<li><a name='Why are you doing this?'></a>Why are you doing this?</li>
<p>Someone has to do this.  I'm blessed to be in a position where I have
some ability to give back to the community that's given me so much and
where I have financial compensation to spend some time participating
in this community.</p>
<p>I also believe that the way to write high quality software is to take
quality seriously.  We have the opportunity to test Perl 6 from the
ground up, having learned lessons and built tools for Perl 5.  If we
do our job correctly, we'll even have tests in place before we have
the language features in place.  Hooray for test-driven development!</p>
<li><a name='You have 5 words. Describe yourself.'></a>You have 5 words. Describe yourself.</li>
<p>I am not really Schwern.</p>
<li><a name='Do you have anything to declare?'></a>Do you have anything to declare?</li>
<p>So this camel and parrot walk into a bar...</p>
</ul>
<a name='Acknowledgements'></a><h1>Acknowledgements</h1>
<p>Back to writing summaries on the train and in the armchair when I get
distracted by almost anything (current distractions, writing a graphical
TestRunner for the ObjcTest framework, Eliza Carthy's utterly
wonderful <i>Anglicana</i> CD and the nsNet puzzle game...). I started
writing this on Monday morning dammit.</p>
<p>Proofreading was once more handled by Aspell and me.</p>
<p>Thanks to chromatic for answering the questionnaire for me. The queue
now has one (count it, one) entry left in it so please consider
sending me your answers to mailto:<a href='mailto:5Ws@bofh.org.uk'>5Ws@bofh.org.uk</a></p>
<p>If you didn't like this summary, why are you still reading it? If you
did like it, please consider one or more of the following options:</p>
<ul>
<li><a name='Send money to the Perl Foundation at donate.perl-foundation.org/ and help support the ongoing development of Perl 6.'></a>Send money to the Perl Foundation at
<a href='http://donate.perl-foundation.org/' target='_blank'>donate.perl-foundation.org</a> and help support the ongoing
development of Perl 6.</li>
<li><a name='Get involved in the Perl 6 process. The mailing lists are open to all. dev.perl.org/perl6/ and www.parrotcode.org/ are good starting points with links to the appropriate mailing lists.'></a>Get involved in the Perl 6 process. The mailing lists are open to
all. <a href='http://dev.perl.org/perl6/' target='_blank'>dev.perl.org</a> and <a href='http://www.parrotcode.org/' target='_blank'>www.parrotcode.org</a>
are good starting points with links to the appropriate mailing lists.</li>
<li><a name='Send feedback, flames, money and/or one of those enormous new Apple Powerbooks to mailto:<a href='mailto:p6summarizer@bofh.org.uk'>p6summarizer@bofh.org.uk</a>'></a>Send feedback, flames, money and/or one of those enormous new Apple
Powerbooks to mailto:<a href='mailto:p6summarizer@bofh.org.uk'>p6summarizer@bofh.org.uk</a></li>
</ul>
<p>The fee paid for publication of these summaries on perl.com is paid
directly to the Perl Foundation.</p>
</div>
